package ChatRoomApp;
import java.io.BufferedReader;
	import java.io.IOException;
	import java.io.InputStreamReader;
	import java.net.Socket;

	
	 
	public class SeverThread implements Runnable {
	    
	    public Socket socket;
	    
	    public SeverThread (Socket socket) {
	        this.socket = socket;
	    }
	 
	    @Override
	    public void run() {
	        try {
	            BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
	            while (true) {
	                String str = br.readLine();
	                System.out.println(str+"\n");
	            }
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	    }
	 
	}


